package com.kilon.workfaq.service.read.impl;

import com.kilon.workfaq.entity.CategoryPo;
import com.kilon.workfaq.mapper.read.CategoryReadMapper;
import com.kilon.workfaq.service.read.CategoryReadService;
import org.springframework.stereotype.Service;

import javax.annotation.Resource;
import java.util.List;

/**
 * 博客分类表(Category)表服务实现类
 *
 * @author makejava
 * @since 2023-02-22 23:24:02
 */
@Service("categoryReadService")
public class CategoryReadServiceImpl implements CategoryReadService {
    @Resource
    private CategoryReadMapper categoryReadMapper;

    /**
     * 通过ID查询单条数据
     *
     * @param id 主键
     * @return 实例对象
     */
    @Override
    public CategoryPo queryById(String id) {
        return this.categoryReadMapper.queryById(id);
    }

    /**
     * 查询全部数据
     *
     * @return 实例对象
     */
    @Override
    public List<CategoryPo> queryAll(CategoryPo category) {
        return this.categoryReadMapper.queryAll(category);
    }
}
